<!-- 产房资料 -->
<script type="text/html" template>
    <link rel="stylesheet" href="{{ layui.setter.base }}style/index.css">
    <link rel="stylesheet" href="{{ layui.setter.base }}style/autoComplete.css">
    <link rel="stylesheet" href="{{ layui.setter.base }}style/css/reset.css">
    <link rel="stylesheet" href="{{ layui.setter.base }}style/alert.css">
    <link rel="stylesheet" href="{{ layui.setter.base }}style/alert-form.css">
</script>
<div class="layui-form layui-fluid row">
    <div class="layui-form-item">
        <label class="layui-form-label">
            <span style="font-size: 18px;color: red;position: relative;display: inline-block;line-height: 20px;vertical-align: middle;top:3px;">*</span>
            厂房编号：
        </label>
        <div class="layui-input-block">
            <input type="text" name="tcFtyId" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">
            <span style="font-size: 18px;color: red;position: relative;display: inline-block;line-height: 20px;vertical-align: middle;top:3px;">*</span>
            公司：
        </label>
        <div class="layui-input-block">
            <input type="text" name="tcFtyCoid" required lay-verify="required" autocomplete="off"
            class="layui-input" id='tcFtyCoid'>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">
            <span style="font-size: 18px;color: red;position: relative;display: inline-block;line-height: 20px;vertical-align: middle;top:3px;">*</span>
            厂房名称：
        </label>
        <div class="layui-input-block">
            <input type="text" name="tcFtyName" required lay-verify="required" autocomplete="off"  class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">
            <span style="font-size: 18px;color: red;position: relative;display: inline-block;line-height: 20px;vertical-align: middle;top:3px;">*</span>
            厂房描述：
        </label>
        <div class="layui-input-block">
            <textarea name="tcFtyDsc" id="" cols="30" rows="10"></textarea>
        </div>
    </div>
    <div class="footer layui-form-item layui-fluid" style="margin-top: 30px;">
        <button data-lang="confirm" class="btn1 layui-btn layui-btn-radius layui-btn-primary"
            lay-filter="submit" lay-submit>确定</button>
        <button data-lang="cancel" class="btn2 layui-btn layui-btn-radius layui-btn-primary">取消</button>
    </div>
</div>
<script>
    layui.use(['table', 'admin', 'laypage', 'jquery', 'laytpl', 'tree', 'form', 'api', 'view', 'laydate', 'setter', 'treeSelect','element','utill'], function () {
        var form = layui.form;
        var table = layui.table;
        var admin = layui.admin;
        var laypage = layui.laypage;
        var $ = layui.jquery;
        var laytpl = layui.laytpl;
        var tree = layui.tree;
        var api = layui.api;
        var view = layui.view;
        var laydate = layui.laydate;
        var setter = layui.setter;
        var treeSelect = layui.treeSelect;
        var utill = layui.utill;
        var element = layui.element;
            utill.fuzzmatch('#tcFtyCoid', {
                isShowValue: false,
                reqObj: {
                    url: api.host + '/fil/AzpSelectAllAzp.json',
                    type: 'POST',
                    dataType: 'json',
                    contentType: 'application/json',
                    data:JSON.stringify({
                        azp02: $('#tcFtyCoid').val(),
                        pageNum: 1,
                        pageSize: 10000
                    }),
                },
                dataTrans: function (res) {
                    return res.data.map((item) => {
                        return {
                            label: item.azp02,
                            value: item.azp01,
                            data: item
                        }
                    })
                }
            });
    });
</script>